﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/themes/20Thing/css/reset.css")
    @Styles.Render("~/Scripts/Lib/bootstrap/css/bootstrap.css")
    @Scripts.Render("~/bundles/modernizr")
    @Styles.Render("~/Content/rating.css")
    @Scripts.Render("~/Scripts/rating.js")
    @Scripts.Render("~/Scripts/jquery-1.8.2.min.js")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/base")
    @RenderSection("scripts", required: false)
    <script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
    @*@Styles.Render("~/Content/themes/20Thing/css/main_full.css")*@
    <script>
        var intoZing = '@ViewBag.IntoZing';
        if (intoZing.toLowerCase() === 'zing') {
            document.write('<link rel="stylesheet" type="text/css" media="all" href="/Content/themes/20Thing/css/main.css" />');
        }
        else {
            document.write('<link rel="stylesheet" type="text/css" media="all" href="/Content/themes/20Thing/css/main_full.css" />');
        }
    </script>
    @Scripts.Render("~/Scripts/Lib/FancyBox/source/jquery.fancybox.js")
    @Styles.Render("~/Scripts/Lib/FancyBox/source/jquery.fancybox.css")
    @Styles.Render("~/Scripts/Lib/Alert/jquery.alerts.css")
    <link rel="stylesheet" type="text/css" href="~/Scripts/Lib/jRating/jquery/jRating.jquery.css" media="screen" />
 
    <script type="text/javascript">
        document.write('<link rel="stylesheet" type="text/css" media="all" href="css/hideOnLoad.css" />');

        if (window.location.hash.match('\/')) {
            window.location = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + window.location.hash.slice(1);
        }

        var SERVER_VARIABLES = {
            PAGE: "Page",
            PAGES: "Pages",
            THING: "THING",
            FOREWORD: "FOREWORD",
            LANG: "en-US",
            SITE_VERSION: 49,
            FACEBOOK_MESSAGE: "A fun guidebook from Google on things you've always wanted to know about browsers & the web (but were afraid to ask",
            FACEBOOK_MESSAGE_SINGLE: "A fun fact I learned today from Google's guidebook to browsers and the web.",
            TWITTER_MESSAGE: "A fun guidebook from Google on things you've always wanted to know about browsers & the web:",
            TWITTER_MESSAGE_SINGLE: "A fun fact I learned today from Google's guidebook to browsers and the web: ",
            BUZZ_MESSAGE: "A fun guidebook from Google on things you've always wanted to know about browsers & the web (but were afraid to ask): http://goo.gl/20things",
            BUZZ_MESSAGE_SINGLE: "A fun fact I learned today from Google's guidebook to browsers and the web: ",
            SOLID_BOOK_COLOR: "#5873a0"
        };

        // Set language for use by Google +1 button.
        window.___gcfg = { lang: SERVER_VARIABLES.LANG };
    </script>
</head>
<body class="normal">
    <div id="preloader">
        <div class="contents">
            <canvas class="animation"></canvas>
            <div class="progress">
                <div class="fill"></div>
            </div>
        </div>
    </div>
    <header>
        <nav>
            <ul>
                <li ><a class="back" href="/City/Detail/@ViewBag.CityId">@ViewBag.CityName.ToUpper()</a></li>
                <li class="table-of-things"><a href="/table-of-things">@Resources.Language.TableOfIndex.ToUpper()</a></li>
                <li class="divider1"></li>
                <li class="about"><a href="#">@Resources.Language.First.ToUpper()</a></li>
                <li class="divider2"></li>
                <li class="credits"><a href="#">@Resources.Language.Credit.ToUpper()</a></li>
                <li class="divider2"></li>
            </ul>
        </nav>

        <div id="language-selector">
            <div id="language-selector-title"><a>VIETNAM (VI)</a></div>
            <div id="language-selector-list">
                <ul>
                    <li><a>ENGLISH (US)</a></li>
                </ul>
            </div>
        </div>

        <!-- Input type="search" is currently too inconsistent across browsers and platforms -->
        <input id="search-field" type="text" value="@Resources.Language.Search">
    </header>
    @RenderBody()
    <footer>
        <span class="curator"><a href="http://www.google.com/chrome?brand=CHJN">Hau Team. ©,2013</a></span>
        <div class="right-side">
            <div class="divider"></div>
            <div class="invite">

                <ul>
                    <li>
                        <div id="zme-root"></div>
                        <script>(function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) { return; }
    js = d.createElement(s);
    js.id = id;
    js.src = "http://static.me.zing.vn/sp/js/all-1.39.js#&appId=663270de6faf4149ac73cb5e77374924&status=true";
    fjs.parentNode.insertBefore(js, fjs);
}
											(document, "script", "zingme-jssdk"));</script>
                        <a class="zme-invite" data-link="http://dulich.azurewebsites.net" data-title="Mời bạn bè" data-type="app"></a>
                    </li>
                </ul>
            </div>
            <div class="divider"></div>
            <div class="sharing">
                <p>@Resources.Language.SHAREBOOK</p>
                <input type="text" class="clipboard-notification" value="" readonly="readonly" />
                <ul>
                    <li class="facebook"><a href="http://www.facebook.com/sharer.php?u=http://20thingsilearned.com&amp;t=20%20Things%20I%20learned%20About%20Browsers%20and%20the%20Web" title="Facebook"></a></li>
                    <li class="twitter"><a href="http://twitter.com/share?original_referer=http://20thingsilearned.com&amp;text=20%20Things%20I%20learned%20About%20Browsers%20and%20the%20Web&amp;url=http://20thingsilearned.com" title="Twitter"></a></li>
                    <li class="gplus"></li>
                    <li class="zingme"><a class="" name="zm_share" type="icon" title="Chia sẻ lên Zing Me"></a>
                        <script src="http://stc.ugc.zdn.vn/link/js/lwb.0.7.js" type="text/javascript"></script>
                    </li>
                    <li class="url"><a href="#"></a></li>
                </ul>
            </div>
            <div class="divider"></div>
            <div class="print">
                <a href="/en-US/all/print" target="_blank"><span class="icon"></span>@Resources.Language.PrintBook.ToUpper()</a>
            </div>
            <div class="divider"></div>
            <div class="lights-wrapper">
                <div class="lights">
                    <a href="#"><span class="icon">LIGHTS</span></a>
                </div>
            </div>
            <div class="divider"></div>
            <div class="fullscreen-wrapper" style="display: none;">
                <div class="fullscreen">
                    <a href="#"><span class="icon"></span>FULL SCREEN</a>
                </div>
            </div>
        </div>
    </footer>
    <script type="text/javascript">
        $(function () {
            //$(".basic").jRating();
            $('.map').fancybox({
                maxWidth: 600,
                fitToView: false,
                width: '550px',
                height: '530px',
                autoSize: false,
                closeClick: false,
                openEffect: 'fadeIn',
                closeEffect: 'none',
                padding: 10,
                //afterClose: function () { location.reload(false); }
            });
            
            $('.ptext').fancybox({
                maxWidth: 600,
                fitToView: false,
                width: '537px',
                height: '530px',
                autoSize: false,
                closeClick: false,
                openEffect: 'fadeIn',
                closeEffect: 'none',
                padding: 10,
                //afterClose: function () { location.reload(false); }
            });

            $('.listImage').fancybox({   
                maxWidth: 600,
                fitToView: false,
                width: '537px',
                height: '530px',
                autoSize: false,
                closeClick: false,
                openEffect: 'fadeIn',
                closeEffect: 'none',
                padding: 10,
                //afterClose: function () { location.reload(false); }
            });

            $('.fancyboxCmt').fancybox({
                maxWidth: 600,
                fitToView: false,
                width: '537px',
                height: '530px',
                autoSize: false,
                closeClick: false,
                openEffect: 'fadeIn',
                closeEffect: 'none',
                padding: 10,
                //afterClose: function () { location.reload(false); }
            });
        });
    </script>
    @*<script src="/Content/themes/20Thing/js/twentythings_full.js"></script>*@
    <script>
        var intoZing = '@ViewBag.IntoZing';
        if (intoZing.toLowerCase() === 'zing') {
            document.write('<script src="/Content/themes/20Thing/js/twentythings.js"><' + '/script>');
        }
        else {
            document.write('<script src="/Content/themes/20Thing/js/twentythings_full.js"><' + '/script>');
        }

    </script>
    <script src="/Content/themes/20Thing/js/twentythings.preloader.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.history.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.locale.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.storage.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.pageflip.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.paperstack.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.illustration.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.navigation.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.cache.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.search.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.chapternav.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.sharing.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.overlay.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.tableofthings.js"></script>
    <script src="/Content/themes/20Thing/js/twentythings.flipintro.js"></script>

    <script src="/Scripts/Lib/Alert/jquery.alerts.js"></script>
    <script type="text/javascript" src="~/Scripts/Lib/jRating/jquery/jRating.jquery.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            TT.initialize();
            $(".basic").jRating({
                onClick: function (element, rate, idBox,nameBox, widthColorOneStar) {
                    $.ajax({
                        url: '@Url.Action("Rating","Place")',
                        type: "Post",
                        data: { rate: rate, placeId: idBox },
                        dataType: "json",
                        success: function (data) {
                            if (data.success) {

                                $(element).attr('data-average', data.Avg);                                
                                $(element).find('.jRatingAverage').css('width', '0px')
                                $(element).find('.jRatingColor').css('width', widthColorOneStar * data.Avg)

                                $(element).parent().children().last().replaceWith('<p class="text">   Đánh giá hiện tại :' + data.Avg + ' bởi ' + data.TotalUser + ' người</p>')
                                $.ajax({
                                    url: '@Url.Action("PostNoticeRate","Zing")',
                                    type:"Post",
                                    data:{rate: rate, placeName:nameBox, ID:idBox},
                                    dataType :'json',
                                    success: function (result)
                                    {
                                    }
                                });
                            }
                            else
                                alert("that bai");
                        },
                    });
                }
            });
        });
        function reportspam(e,b) {
            $.ajax({
                url: '@Url.Action("Spams","Place")',
                    data: { placeId: e },
                    type: "post",
                    dataType: "Json",
                    success: function (data) {
                        if (data.status == 'OK') {
                            jAlert('Cảm ơn bạn đã báo cáo cho chúng tôi', 'Thông báo');
                            var img = b.children;
                            $(img).attr('src', '/Content/themes/custom/Image/Flag-04-1.png');
                        }
                        else {
                            jAlert('Chưa thực hiện được', 'Thông báo');
                        }
                    }
                });
            };
    </script>
</body>
</html>
